<?PHP
#
# Author: Cody Sorgenfrey and Phil Spagnolo
#

include_once("common.php");


$title= "Live Stream";
$meta_key= "Church, Puyallup, SHCC, South Hill, Calvary Chapel, South Hill Calvary Chapel";
$meta_desc= "The mobile site for Puyallup church; South Hill Calvary Chapel";
$morehtml=null;
$morejava = null;

startPage($title, $meta_key, $meta_desc, $morehtml, $morejava);

$now = time();
$day = date('w', $now);
$currentTime = date('H:i',$now);

$SatStart="18:15";
$SatEnd="20:00";
$WedStart="18:45";
$WedEnd="20:30";
$SunStart="08:45";
$SunEnd="10:30";

if (($day == 0 && CheckTime($currentTime,$SunStart,$SunEnd)) ||
	   ($day == 3 && CheckTime($currentTime,$WedStart,$WedEnd))) {
	   
	if (userIsApple()) {
			
		printf("<script type='text/javascript'>
				window.location = 'http://50.19.125.137:1935/live/myStream.sdp/playlist.m3u8';
				</script>");
					
	} else {
	
		printf("<script type='text/javascript'>
				window.location = '/flash/forFlashPlayer10.1/android.php';
				</script>");
	
	}
}

printf("<div id='liveVidParagraph'>\n");
printf("<p>Two times each week, we stream our services live so that those who can't make it in person have an opportunity to take in the word and worship.\n");
printf("We stream services on:<br><br><u>Sunday from 9:00 to 10:45am<br>Wednesdays from 7:00 to 8:30pm</u><br><br>We hope this service is a blessing to you.<br><br>\n");
printf("Please select your operating system to proceed to video:</p>\n");
printf("</div>\n");

?>

<div id='vidIconHolder'>
	<div class='vidIcons'>

		<a href='/flash/forFlashPlayer10.1/android.php'><img id='androidIcon' src='http://southhillcalvary.org/images/androidIcon.png' style='width:75px; margin-right:15px;'></img></a>
		<a href='http://50.19.125.137:1935/live/myStream.sdp/playlist.m3u8'><img id='appleIcon' src='http://southhillcalvary.org/images/appleIcon.png' style='width:75px;'></img></a>

		<br><br><a href='http://50.19.125.137:1935/live/myStream.sdp/playlist.m3u8'>Other</a><br><br>
	</div>
</div>

<?php
endPage();
?>
